home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / shells / bashsrc.zoo / src / makefile.st < prev   
Encoding:
Makefile  |  1991-06-08  |  4.1 KB  |  121 lines

  1. # (Makefile for Mint-BASH under GCC)
  2. # (Hacked together by Dave Gymer 05 Jun 91 (dpg@Cs.Nott.AC.UK))
  3. # (Any suggestions for improvement will be greatly appreciated.)
  4. # (This has been tested on a 4meg STE on a Minix partition with GCC 1.39.)
  5.  
  6. # (I have these. Why not you?)
  7. BISON = bison
  8. CC = gcc
  9.  
  10. # (This is where I keep my login shells.)
  11. SHELL = d:/usr/bin/bash.prg
  12.  
  13. # (This is me. Unless you want to take over responsability, please leave
  14. # this alone.)
  15. MAINTAINER = dpg
  16.  
  17. # (I'm looking foward to the day when we can get rid of these and just
  18. # pretend to be a UN*X box. MiNT will get there, in the end, I hope. :-)
  19. MACHINE = atarist
  20. OS = MiNT 
  21.  
  22. # (GCC-ST libraries now pretty complete. Most impressive.)
  23. LINEBUF = -DHAVE_SETLINEBUF
  24. VPRINTF = -DHAVE_VPRINTF
  25.  
  26. # (I've got a 4 meg machine. Those with less memory may find that -O is
  27. # too big. Please let me know if you try. Also, while you're testing, you
  28. # may find that taking -O out speeds compilation up _a lot_.)
  29. SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) -D$(MACHINE) -D$(OS)
  30. CFLAGS = -O -fomit-frame-pointer -fcombine-regs $(SYSTEM_FLAGS)
  31.  
  32. # These are required for sending bug reports.
  33. SYSTEM_NAME = $(MACHINE)
  34. OS_NAME = $(OS)
  35.  
  36. # The type of machine Bash is being compiled on.
  37. HOSTTYPE_DECL = -DHOSTTYPE='"$(SYSTEM_NAME)"'
  38.  
  39. # The default primary and secondary prompts.
  40. PPROMPT = '"${PROGRAM}\\$$ "'
  41. SPROMPT = '"${PROGRAM}>"'
  42.  
  43. # The group of configuration flags.  These are for shell.c
  44. CFG_FLAGS = -DMAINTAINER='"$(MAINTAINER)"' -DPPROMPT=$(PPROMPT) \
  45.         -DSPROMPT=$(SPROMPT) -DOS_NAME='$(OS_NAME)' \
  46.         -DSYSTEM_NAME='$(SYSTEM_NAME)' $(SIGLIST_FLAG)
  47.  
  48. RM = rm -f
  49. AR = gcc-ar 
  50.  
  51. # Locally required libraries.
  52. # (Integer only. Don't include symbol table (saves about 20k).)
  53. LOCAL_LIBS = -s -liio
  54.  
  55. # (Must keep these in order, I think.)
  56. LIBRARIES = -lreadline -ltermcap
  57.  
  58. OBJECTS  = shell.o parse-t.o general.o make_cmd.o print_cmd.o \
  59.        dispose_cmd.o execute_cmd.o variables.o builtins.o copy_cmd.o \
  60.        flags.o jobs.o subst.o glob.o hash.o mailcheck.o test.o \
  61.        trap.o alias.o braces.o unwind_prot.o \
  62.        $(SIGLIST) bashline.o ulimit.o version.o
  63.  
  64. # (build it, circumventing GCC's braindeaded-ness on Minix partitions)
  65. xbash.prg:    .build $(OBJECTS)
  66.     $(CC) -o NEWBASH.PRG $(OBJECTS) $(LIBRARIES) $(LOCAL_LIBS)
  67.     mv NEWBASH.PRG xbash.prg
  68.  
  69. # (I built this on a Minix partition. I don't know how happy it'll be if
  70. # you do this on a TOS parition. If you try, please let me know.)
  71. .build:        .make newvers.ttp
  72.     if ./newvers -build; then mv newversion.h version.h; fi
  73.  
  74. .make:
  75.     @echo "   *   Making Bash for a $(MACHINE) running $(OS)."
  76.     @echo "$(PROGRAM) last made for a $(MACHINE) running $(OS)" >.machine
  77.     touch .make
  78.  
  79. version.h:    newvers.ttp
  80.     if ./newvers -build; then mv newversion.h version.h; fi
  81.  
  82. shell.h:    general.h variables.h config.h
  83.         touch shell.h
  84.  
  85. # (The problem with bison is that it needs lines in UN*X text file format.
  86. # If you edit it with an editor which saves out the lines MeSsy-DOS-style
  87. # (ie. with \n\r) like JOVE, make sure you transform it back somehow prior
  88. # to re-making.)
  89. parse-t.c:    parse.y shell.h
  90.         $(BISON) -d parse.y
  91.  
  92. shell.o:    shell.h flags.h shell.c
  93.         $(CC) $(CFG_FLAGS) $(CFLAGS) -c shell.c
  94.  
  95. braces.o:    braces.c
  96.         $(CC) $(CFLAGS) -DSHELL -c braces.c
  97.  
  98. bashline.o:    bashline.c config.h variables.h builtins.h
  99. jobs.o:        jobs.c nojobs.c jobs.h config.h
  100. version.o:    version.h version.c .build
  101. general.o:    general.c shell.h
  102. parse-t.h:    parse-t.c
  103. alias.o:    alias.h alias.c
  104. subst.o:    subst.c shell.h
  105. make_cmd.o:    shell.h config.h make_cmd.c
  106. print_cmd.o:    shell.h parse-t.h print_cmd.c
  107. execute_cmd.o:    shell.h parse-t.h builtins.h flags.h config.h execute_cmd.c
  108. dispose_cmd.o:    shell.h dispose_cmd.c
  109. copy_cmd.o:    shell.h copy_cmd.c
  110. builtins.o:    shell.h flags.h trap.h builtins.h jobs.h config.h builtins.c
  111. flags.o:    flags.h flags.c config.h
  112. hash.o:        hash.h hash.c
  113. trap.o:        shell.h trap.h config.h trap.c
  114. variables.o:    variables.h flags.h variables.c
  115.     $(CC) -c $(CFLAGS) $(HOSTTYPE_DECL) variables.c
  116.  
  117. # (I built this on a Minix partition. GCC is brain-dead!)
  118. newvers.ttp:    newversion.c
  119.         $(CC) -o NEWVERSI.PRG newversion.c -lpml
  120.         mv NEWVERSI.PRG newvers.ttp
  121.